package com.itheima.xx.web;

import com.itheima.xx.pojo.User;
import com.itheima.xx.service.UserServiceImpl;

import java.util.List;
import java.util.Scanner;

/**
 * Description:
 *
 * @author codermao
 * @date 2023/10/28 16:19
 */
public class QueryAllUsersAndRolesWeb {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        System.out.println("请输入起始索引：");
        int startIndex = scan.nextInt();
        System.out.println("请输入每页条数：");
        int pageSize = scan.nextInt();

        UserServiceImpl userService = new UserServiceImpl();
        List<User> userList = userService.queryAllUsersAndRoles(startIndex,pageSize);

        for (User user : userList) {
            System.out.println(user);
        }

        scan.close();
    }
}
